import axios from '@/utils/request'
const base = '/shopmovie'

export function listShopMovie(params) {
  return axios({
    url: `${base}/movies`,
    method: 'get',
    params: params
  })
}

export function saveShopMovie(data) {
  return axios({
    url: `${base}/movies`,
    method: 'post',
    data
  })
}

export function modifyShopMovie(id, data) {
  return axios({
    url: `${base}/movies/${id}`,
    method: 'put',
    data
  })
}

export function online(id) {
  return axios({
    url: `${base}/movies/` + id + '/online',
    method: 'put'
  })
}

export function offline(id) {
  return axios({
    url: `${base}/movies/` + id + '/offline',
    method: 'put'
  })
}
